{
	template:`
    <m-page @back="back" title="会员充值">
        <template #bar>
            <div class="padding-left">
                <status type="orderStatus" :value="model.status"></status>
            </div>
            <div class="flex-sub padding-lr text-sm text-right">
                [{{dict('member.order.model.MemberRecharge!type',model.type)}}]<span class="text-red text-lg padding-left-sm">{{formatAmount(model.payAmount)}}</span>元
            </div>
        </template>
        <m-top></m-top>
        <m-title>充值信息<template #action>订单编号：{{model.orderNo}}</template></m-title>
        <m-card>
            <div class="cu-form-group">
                <div class="title">会员</div>
                <m-form-item>
                    <div>{{model.member.realName}} <span class="text-sm">{{model.member.phoneNum}}</span></div>
                </m-form-item>
            </div>
            <div class="cu-form-group">
                <div class="title">服务员工</div>
                <m-form-item>
                    <div>{{model.serveUser.realName}} <span class="text-sm">{{model.serveUser.phoneNum}}</span></div>
                </m-form-item>
            </div>
            <div class="cu-form-group">
                <div class="title">付款类型</div>
                <m-dict-option :operable="false" class="flex-sub" v-model="model.type" type="member.order.model.MemberRecharge!type"></m-dict-option>
            </div>
            <div class="cu-form-group">
                <div class="title">付款金额</div>
                <m-input-number :operable="false" v-model="model.payAmount" placeholder="请输入付款金额"></m-input-number>
                <div>元</div>
            </div>
            <div class="cu-form-group">
                <div class="title">赠送金额</div>
                <m-input-number :operable="false" v-model="model.giveAmount" placeholder="请输入赠送金额"></m-input-number>
                <div>元</div>
            </div>
            <div class="cu-form-group">
                <div class="title">赠送积分</div>
                <m-input-number :operable="false" v-model="model.givePoint" placeholder="请输入赠送积分" format="#,##0"></m-input-number>
            </div>
            <div class="cu-form-group">
                <div class="title">账期</div>
                <m-select-date :operable="false" class="flex-sub" v-model="model.accountDate" placeholder="请选择账期"></m-select-date>
            </div>
            <div class="cu-form-group">
                <div class="title">备注</div>
                <m-input type="textarea" :operable="false" v-model="model.remark" placeholder="请输入备注"></m-input>
            </div>
        </m-card>
        <m-title>登记确认信息</m-title>
        <m-card>
            <div class="padding-xs flex align-center">
                <m-grid :col="2" class="flex-sub">
                    <m-desc title="登记员工">{{model.inputUser.realName}}<small>{{model.inputUser.phoneNum}}</small></m-desc>
                    <m-desc title="登记时间">{{formatDate(model.inputDate,'yyyy-MM-dd HH:mm')}}</m-desc>
                    <m-desc title="确认员工">{{model.confirmUser.realName}}<small>{{model.confirmUser.phoneNum}}</small></m-desc>
                    <m-desc title="确认时间">{{formatDate(model.confirmDate,'yyyy-MM-dd HH:mm')}}</m-desc>
                </m-grid>
            </div>
        </m-card>
        <m-title v-if="model.order.oid">相关订单</m-title>
        <m-card v-if="model.order.oid">
            <div class="flex padding-sm align-center" @click="openMemberPage('orderInfo',{oid:model.order.oid})">
                <div class="flex-sub padding-lr-sm">
                    {{formatDate(model.order.inputDate,'yyyy-MM-dd')}} /
                    实付{{formatAmount(model.order.payAmount)}}元
                </div>
                <status type="orderStatus" :value="model.order.status"></status>
            </div>
        </m-card>
    </m-page>
	`,
	props: ['param','parentVue'],
	data:function(){
		return {
		    model:{member:{},serveUser:{},inputUser:{},inputStore:{},confirmUser:{},order:{}}
		};
	},
	mounted(){
        this.requestData('action/member/memberRecharge/getInfo',
            {oid:this.param.oid},
            (data)=>{
                if(data.code==0){
                    this.model=data.model;
                }else{
                    this.remind().error(data.msg);
                }
            }
        );
	},
	methods:{
	    openMemberPage:function(page,params,fn){
            this.openPage('member/'+page+'.js',params,fn);
	    },
	}
}